{	Problem: http://codeforces.ru/problemset/problem/41/B
	Verdict: Accepted
}
var i,n,b,r,j,k,c,t:longint; a:array[1..2010] of longint;
begin
read(n,b);
for i:=1 to n do read(a[i]);
r:=0;
for i:=1 to n do begin
    k:=b div a[i];
    t:=b mod a[i];
    for j:=i to n do begin
        c:=k*a[j];
        if r<c+t then r:=c+t;        
    end;
end;
write(r);
end.